﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace BuildHelper.Setup.Apps
{
    public partial class FormProjekty : MyBaseSqlCeGridForm
    {
        public FormProjekty()
        {
            InitializeComponent();
        }

        protected override bool ValidateAll()
        {
            return base.ValidateAll() && 
                projektyDataSet.STP_APPS.ValidateColUnique("STP_APP_KOD", "Kod powinien być unikalny.") &&
                projektyDataSet.STP_APPS.ValidateColUnique("STP_APP_NAZWA", "Nazwa powinna być unikalna.");
        }
        protected override bool Save()
        {
            bool res = base.Save();
            if (res)
                GlobalTools.RefreshSystems();
            return res;
        }
    }
}
